package com.link2room.aeriabots.controller.inside;

import com.link2room.aeriabots.dto.param.inside.WxPromotionTransfersInsideParamDto;
import com.link2room.aeriabots.dto.result.base.WxPromotionTransfersResDto;
import com.link2room.aeriabots.facade.IWxPayFacadeService;
import com.link2room.common.dto.result.base.BaseResultDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by LN on 2016/10/31.
 */
@Api(tags = {"微信企业支付"})
@RestController
@RequestMapping("/in/PromotionTransfers")
public class WxPromotionTransfersInsideController {
    @Resource
    private IWxPayFacadeService wxPayFacadeService;

    @ApiOperation(value = "微信企业支付", response = WxPromotionTransfersResDto.class)
    @ApiImplicitParams(value = {
    })
    @RequestMapping(method = RequestMethod.POST)
    public BaseResultDto promotionTransfers(
            @RequestBody WxPromotionTransfersInsideParamDto paramDto
    ) throws Exception {
        BaseResultDto res = new BaseResultDto();
        WxPromotionTransfersResDto resDto = wxPayFacadeService.requestPromotionTransfers(paramDto);
        res.setResultCode(0);
        res.setResultInfo(resDto);
        return res;
    }
}
